<!DOCTYPE html>
<html>
<head>
    <title>工装基础档案</title>
    #parse("sys/header.html")
    <style>
        .col-sm-2 {
            width: 30%;
        }
        .sugon_upload_btn {
            display: -webkit-inline-box;
            display: inline-block;
        }
         .details td, .details th{
             vertical-align: text-bottom;
         }
        ::-webkit-scrollbar{
            width: 10px;
            height: 10px;
        }
        ::-webkit-scrollbar-thumb{
            border-radius: 10px;
            -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
            background: #a8a5a5;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="3">
                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.mapNo" @on-enter="query" placeholder="图号"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.type" @on-enter="query" placeholder="规格"></i-input>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                #if($shiro.hasPermission("toolsbase:import"))
                <Upload ref="uploadFile"
                        action="../toolsbase/importJudgeStandard"
                        :format="['xlsx','xls']"
                        :before-upload="handleBeforeUpload"
                        :on-success="handleSuccess" :on-error="handleError"
                        :on-format-error="handleFormatError" class="sugon_upload_btn">
                    <i-button type="info"><i class="fa fa-hand-o-down"></i>&nbsp;导入周期性验证标准</i-button>
                </Upload>
                #end
                #if($shiro.hasPermission("toolsbase:import"))
                <Upload ref="uploadFile"
                        action="../toolsbase/import"
                        :format="['xlsx','xls']"
                        :before-upload="handleBeforeUpload"
                        :on-success="handleSuccess" :on-error="handleError"
                        :on-format-error="handleFormatError" class="sugon_upload_btn">
                    <i-button type="error"><i class="fa fa-hand-o-down"></i>&nbsp;导入</i-button>
                </Upload>
                #end
                #if($shiro.hasPermission("toolsbase:export"))
                <i-button type="success" @click="exportData"><i class="fa fa-hand-o-up"></i>&nbsp;导出</i-button>
                #end
                #if($shiro.hasPermission("toolsbase:review1"))
                <i-button type="primary" @click="deptCheck"><i class="fa fa-gavel"></i>&nbsp;技术质量室审核</i-button>
                #end
                #if($shiro.hasPermission("toolsbase:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("toolsbase:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("toolsbase:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
    </div>
    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="toolsBase" :rules="ruleValidate" :label-width="80">
            <Row>
                <i-col span="11">
                    <Form-item label="名称" prop="name">
                        <i-input v-model="toolsBase.name" placeholder="名称"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="1">
                    <Form-item label="ERP编码" prop="erpCode">
                        <i-input v-model="toolsBase.erpCode" placeholder="ERP编码"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="图号" prop="mapNo">
                        <i-input v-model="toolsBase.mapNo" placeholder="图号"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="1">
                    <Form-item label="自制图号" prop="createNo">
                        <i-input v-model="toolsBase.createNo" placeholder="自制图号"></i-input>
                    </Form-item>
                </i-col>

            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="型号规格" prop="type">
                        <i-input v-model="toolsBase.type" placeholder="型号规格"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="1">
                    <Form-item label="适用机型" prop="applicableModel">
                        <i-input v-model="toolsBase.applicableModel" placeholder="适用机型"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="是否易损件" prop="isVulnerable">
                        <Radio-group v-model="toolsBase.isVulnerable">
                            <Radio :label="0">
                                <span>否</span>
                            </Radio>
                            <Radio :label="1">
                                <span>是</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="工装类别" prop="toolsType">
                        <i-select v-model="toolsBase.toolsType" placeholder="工装类别">
                            <i-option v-for="item in toolstypeList" :value="item.typeCode" :key="item.typeCode">{{item.typeName}}
                            </i-option>
                        </i-select>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="1">
                    <Form-item label="管控方式">
                        <i-select v-model="toolsBase.controlWayArray" multiple placeholder="管控方式">
                            <i-option v-for="item in toolscontrolwayList" :value="item.controlCode" :key="item.id">
                                {{item.controlName}}
                            </i-option>
                        </i-select>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="备注信息" prop="remark">
                        <i-input type="textarea" v-model="toolsBase.remark" placeholder="请输入备注信息"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">
                返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
    <!-- 审核表单区域 -->
    <div id="reviewLayer" style="display: none;">
        <form class="form-horizontal" style="width: 500px;">
            <div class="form-group">
                <div class="form-group">
                    <div class="col-sm-2 control-label">审核状态</div>
                    <div class="col-sm-8" style="margin-top: 6px">
                        <Radio-group v-model="approveParam.status">
                            <Radio :label="1"><span>通过</span></Radio>
                            <Radio :label="2"><span>不通过</span></Radio>
                        </Radio-group>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">备注</div>
                    <div class="col-sm-8" style="margin-top: 6px">
                        <i-input type="textarea" v-model="approveParam.remark" placeholder="审批备注"></i-input>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<div id="categoryLayer" style="display: none;padding:10px;">
    <ul id="categoryTree" class="ztree"></ul>
</div>

<script src="${rc.contextPath}/js/tools/toolsbase.js?_${date.systemTime}"></script>
</body>
</html>
